OBJ=$(patsubst %.c, %.o, $(wildcard ./*.c))
TARGET=libMyAdd.so

LIBPATH=/usr/lib

$(TARGET):$(OBJ)
	$(CC) -shared -fPIC $^ -o $@
	cp $(TARGET) $(LIBPATH)

#模式匹配  %目标：%依赖
%.o:%.c
	$(CC) -c $^ -o $@

#伪目标
.PHONY:clean install

clean:
	$(RM) *.o $(TARGET)

